package com.fhz.day014;

import android.app.Application;
import android.content.Context;
import android.content.res.Configuration;

import androidx.annotation.NonNull;

import java.util.ArrayList;
import java.util.List;

/**
 * 时间:2022/5/7
 *
 * @author msfeng
 * 简述: TODO
 */
public class MyApp extends Application {
    //应用启动调用的第一个方法
    public static List<String> list;
    public static Context context;
    @Override
    public void onCreate() {
        super.onCreate();
        //整个应用资源的初始化,不要放耗时,否则,app启动慢
        list = new ArrayList<>();
        context = this;
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
        //资源释放
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        //无用资源清理
    }

    @Override
    public void onConfigurationChanged(@NonNull Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
    }
}

